import { useNavigate } from "react-router-dom";

const ErrorPage = () => {
  const navigate = useNavigate();
  const goHome = () => {
    console.log("goHome");
    navigate("/");
  };
  return (
    <div>
      <h1>错误页面</h1>
      <button onClick={goHome}>回到首页</button>
    </div>
  );
};

export default ErrorPage;
